home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
001
/
bootxmdm.c64
< prev
next >
Wrap
Text File
|
1985-06-03
|
4KB
|
163 lines
<S>TOP/<P>AUSE
FROM: Compuserve - C64 Programming
BY: Chrisdos
TITLE: Bootstrap XModem - BXD.TXT
DATE: 2/11/85
----------------------------------
Ya say you can't download because you
only have a dumb terminal program.
Ya say if you could download, that you
would download a new terminal program
that could download. (Catch 22!)
Well! I tell ya what I'm gonna do...
Step right up and copy down the
following SHORT program. Type it in and
save it to disk.
The program is a simple Bootstrap
XMODEM Downloader, and if the wind is
blowing right, will permit you to
download from Compuserve's CBIG Sig,
the full featured Xmodem terminal
program > CBTERM/C64.
Once you have CBTERM/C64, you can
up or download anything to/from CIS and
any Xmodem BBS systems.
Step closer young man, and I'll tell
you how it works.....
The program (which I will call BXD.BAS)
is a short routine to only download
a file in xmodem. It is used in
conjunction with your present terminal
program. You use your present dumb
terminal program to go on line and
connect with CIS. You then goto
the CBIG Sig, (GO CBIG at the ! prompt)
and into its DL2 data library. There
you find the latest version of
CBTERM/C64. You must get the .BIN
version of CBTERM. (not the .IMG
version)
You instruct CIS to Download the
CBTERM program using XMODEM protocol.
CIS will respond that it is begining
the download. At this point you EXIT
your terminal program (KEEP YOUR MODEM
ON LINE! JUST EXIT YOUR TERMINAL
PROGRAM.) and quickly load BXD.BAS.
Then you just RUN it.
BXD will then do an XMODEM download
of the file and write it to disk. If
all works well, in 15 mins. you should
have a brand spanking new copy of
CBTERM/C64 on your disk. (note: only
run your dumb terminal program and
BXD.BAS at 300 baud.)
BXD.BAS does the following:
When RUN, will handshake to CIS to
start the transfer. A disk file is
opened and is called CBTERM into
which the incomming data is written.
BXD then waits to recieve data blocks
of 132 bytes long. Each block has
a checksum that is matched and if
found to be wrong, the block is rejectedand cis sends it again. (note: the
first block is offen rejected on the
first try by BXD, but gets through the
second time around.)
If the checksum is ok the block is
written to the disk and the next
block is recived. This continues
untill the end of data marker is
sent. BXD will say "DONE" and you should
have a good copy of CBTERM/C64 now on
your disk.
Reset your computer and load CBTERM
and use that as your new SMART terminal
program.
Trying to keep BXD brief, many shortcutswere taken. There is no time out check
or block number check as would be
included in a full featured XMODEM
program. If you suffer from noisey
phone lines, you may be in trouble
trying to use BXD. BXD expects to
recieve 132 bytes in a block, if for
some reason, a bute is dropped, BXD
will sit in its loop and hang.
Each byte that is recieve is marked
by a "." displayed on the screen.
and when a full block is recieve this
is stated also. If you see BXD stop
for longer than 60 seconds without
recieveing any more bytes then you
could try this: Press <STOP> to
break the program. The enter: GOTO 50
This will reject the last block recievedand restart looking for the block.
If you coninualy get CHECK SUM BAD
errors, then log off and reload
your dumb terminal program and
try the process again.
Don't forget to Verify the disk you
were using as the opened file will
not be good.
Here is the code for BXD.BAS:
10 print"bootstrap xmodem downloader"
11 print"(c) 1985 by chrisdos"
20 open2,2,0,chr$(6):dim i%(132)
30 ack$=chr$(6):nak$=chr$(21):eot$=chr$(4)
40 open8,8,8,"cbterm,w,p"
50 forx=1to25:get#2,a$:nextx:print#2,nak$;
60 gosub100
70 ifck%<>i%(132)thenprint"check sum bad":goto50
80 forx=4to131:print#8,chr$(i%(x));:nextx:get#2,a$
90 b=b+1:print"block ok":print#2,ack$;:goto60
100 n=fre(0):forx=1to132
110 ifpeek(667)=peek(668)goto110
120 get#2,a$:i%(x)=asc(a$+chr$(0)):print".";
130 ifx=1anda$=eot$thenclose8:print"done":print#2,ack$:stop
140 nextx:print"have block "b
150 ck%=0:forx=1to131
160 ck%=(ck%+i%(x))and255:nextx:return
Enter it carefully, don't forget the ;'sand other easyly overlooked things.
If all goes well, you will be able
to download a very fine terminal programthat you can then use to up and down
load just about anything else.
HAVE FUN !
BXD.BAS (C) 1985 by Chrisdos
<CR>-Quit
<M>-List files
File # use to up and down
load just about anything else.
HA